package com.atguigu.gmall.realtime.function;


import com.atguigu.gmall.realtime.base.SourceCt;
import org.apache.flink.table.functions.TableFunction;

/*
 * @description: TODO
 * @param
 * @return
 * @author liuyun
 * @date 2022-3-28 21:44
 */
public class KwProduct extends TableFunction<SourceCt> {
    public void eval(Long click_ct, Long cart_ct, Long order_ct) {
        if (click_ct > 0) {
            collect(new SourceCt("click", click_ct));
        }
        
        if (cart_ct > 0) {
            collect(new SourceCt("cart", cart_ct));
        }
        
        if (order_ct > 0) {
            collect(new SourceCt("order", order_ct));
        }
        
        
    }
}
